
var AIP_dom=(document.getElementById)?true:false;var AIP_ns5=((navigator.
userAgent.indexOf("Gecko")>-1)&&AIP_dom)?true:false;var AIP_ie5=((navigator.
userAgent.indexOf("MSIE")>-1)&&AIP_dom)?true:false;var AIP_ns4=(document.layers
&&!AIP_dom)?true:false;var AIP_ie4=(document.all&&!AIP_dom)?true:false;function 
AIP_moveItemUp(id)
{AIP_moveItem(id,0);}function AIP_moveItemDown(id)
{AIP_moveItem(id,1);}function AIP_moveItemLeft(id)
{AIP_moveItem(id,2);}function AIP_moveItemRight(id)
{AIP_moveItem(id,3);}function AIP_removeItem(z8eccef35df,index)
{if(AIP_ns5)
z8eccef35df.options[index]==null;else
z8eccef35df.options.remove(index);}function AIP_getSelection(id)
{var z8eccef35df=AIP_getObject(id+'_select');var z8633b1f00b='';for(index=0;
index<z8eccef35df.options.length;index++)
if(z8eccef35df.options[index].selected)
z8633b1f00b+=index+",";return z8633b1f00b;}function AIP_moveItem(id,direction)
{var z8eccef35df=AIP_getObject(id+'_select');selectedIndex=z8eccef35df.
selectedIndex;if(direction==0)
{for(index=0;index<z8eccef35df.options.length;index++)
{var item=z8eccef35df.options[index];if(item.selected==true&&index>0&&item.
getAttribute('locked')==null)
{AIP_removeItem(z8eccef35df,index);z8eccef35df.options.add(item,index-1);}}}else
 if(direction==1)
{for(index=z8eccef35df.options.length-1;index>=0;index--)
{var item=z8eccef35df.options[index];if(item.selected==true&&index<z8eccef35df.
options.length&&item.getAttribute('locked')==null)
{AIP_removeItem(z8eccef35df,index);z8eccef35df.options.add(item,index+(AIP_ns5?2
:1));}}}else if(direction==2||direction==3)
{var z26af72a6ae=AIP_getObject(z8eccef35df.getAttribute((direction==2?
'leftlistbox':'rightlistbox'))+'_select');for(index=z8eccef35df.options.length-1
;index>=0;index--)
{var item=z8eccef35df.options[index];if(item.selected==true&&index<z8eccef35df.
options.length&&item.getAttribute('locked')==null)
{AIP_removeItem(z8eccef35df,index);var z9b918214fb=(item.text.indexOf('. ')>0?
item.text.substring(item.text.indexOf('.')+2):item.text);item.text=z9b918214fb;
z26af72a6ae.options.add(item);
if(z26af72a6ae.getAttribute('enumerate')!=null)
AIP_enumerate(z26af72a6ae.id);}}}AIP_saveOrder(id);if(z8eccef35df.getAttribute(
'enumerate')!=null)
AIP_enumerate(z8eccef35df.id);}function AIP_enumerate(id)
{var z8eccef35df=AIP_getObject(id);var index=0;for(index=0;index<z8eccef35df.
options.length;index++)
{var item=z8eccef35df.options[index];var z9b918214fb=(item.text.indexOf('. ')>0?
item.text.substring(item.text.indexOf('.')+2):item.text);item.text=(index+1)+
'. '+z9b918214fb;}}function AIP_getObject(id)
{return document.getElementById(id);}function AIP_saveOrder(id)
{var z46f7cd3d78='';var z8eccef35df=AIP_getObject(id+'_select');for(index=0;
index<z8eccef35df.options.length;index++)
z46f7cd3d78+=z8eccef35df.options[index].value+'~'+z8eccef35df.options[index].
text+'~'+z8eccef35df.options[index].selected+'|';AIP_getObject(id).value=
z46f7cd3d78;}
function AIP_compare(zbcc43d2a84,zc9b0c97aca)
{var zbcc43d2a84=AIP_rightTrim(AIP_leftTrim(zbcc43d2a84+''));var zc9b0c97aca=
AIP_rightTrim(AIP_leftTrim(zc9b0c97aca+''));if(zbcc43d2a84.length==0)return 0;
if(zc9b0c97aca.length==0)return 0;if(zbcc43d2a84.charAt(0)=='-'&&zc9b0c97aca.
charAt(0)=='-')
{zbcc43d2a84=zbcc43d2a84.substring(1,zbcc43d2a84.length);zc9b0c97aca=zc9b0c97aca
.substring(1,zc9b0c97aca.length);return-AIP_compare(zbcc43d2a84,zc9b0c97aca);}
else if(zbcc43d2a84.charAt(0)=='-')
{zbcc43d2a84=zbcc43d2a84.substring(1,zbcc43d2a84.length);if(AIP_compare(
zbcc43d2a84,0)==0&&AIP_compare(zc9b0c97aca,0)==0)return 0;else return-1;}else if
(zc9b0c97aca.charAt(0)=='-')
{zc9b0c97aca=zc9b0c97aca.substring(1,zc9b0c97aca.length);if(AIP_compare(
zbcc43d2a84,0)==0&&AIP_compare(zc9b0c97aca,0)==0)return 0;else return 1;}
z7f056f6a64=0;z71c07007c6=0;if(zbcc43d2a84.indexOf('.')==-1)zeb017944c8=
zbcc43d2a84.length;else zeb017944c8=zbcc43d2a84.indexOf('.');if(zc9b0c97aca.
indexOf('.')==-1)zbe76391c19=zc9b0c97aca.length;else zbe76391c19=zc9b0c97aca.
indexOf('.');zb1879ba325=1;z30859931d0=0;z2b2db5185c=0;while(zb1879ba325)
{zb1879ba325=0;
if(z7f056f6a64<zbcc43d2a84.length)
{zb1879ba325=1;z30859931d0=zbcc43d2a84.charAt(z7f056f6a64);if(z30859931d0=='.')
z30859931d0=0;z22d511df03=zeb017944c8-z7f056f6a64;}if(z71c07007c6<zc9b0c97aca.
length)
{zb1879ba325=1;z2b2db5185c=zc9b0c97aca.charAt(z71c07007c6);if(z2b2db5185c=='.')
z2b2db5185c=0;z59552438c1=zbe76391c19-z71c07007c6;}if('1'<=z30859931d0&&
z30859931d0<='9')
{if((z22d511df03>z59552438c1&&z59552438c1>=0)||(z22d511df03==z59552438c1&&
z30859931d0>z2b2db5185c))return 1;if(z71c07007c6>=zc9b0c97aca.length&&
z22d511df03<0&&z22d511df03!=z59552438c1&&z7f056f6a64<zbcc43d2a84.length)
return 1;}if('1'<=z2b2db5185c&&z2b2db5185c<='9')
{if((z59552438c1>z22d511df03&&z22d511df03>=0)||(z59552438c1==z22d511df03&&
z2b2db5185c>z30859931d0))return-1;if(z7f056f6a64>=zbcc43d2a84.length&&
z59552438c1<0&&z22d511df03!=z59552438c1&&z71c07007c6<zc9b0c97aca.length)
return-1;}if(z22d511df03>z59552438c1&&z7f056f6a64<zbcc43d2a84.length)z7f056f6a64+=1;else
 if(z59552438c1>z22d511df03&&z71c07007c6<zc9b0c97aca.length)z71c07007c6+=1;else{
z7f056f6a64+=1;z71c07007c6+=1;}}return 0;}function AIP_numeralsOnly(z47b8ea6de4,
input,zcff736fcd7,z634e45b2d9,zee4bb7ed49,zbb9926710f)
{if(AIP_compare(zcff736fcd7,0)==-1){var z46212caa6d=
/^(\s)*(\-)?(0|[1-9]\d*)?(\.\d*)?(\s)*$/;var zccaa9ca98c=
/^(\s)*(\-)?(0|[1-9]\d*)?(\s)*$/;}else{var z46212caa6d=
/^(\s)*(0|[1-9]\d*)?(\.\d*)?(\s)*$/;var zccaa9ca98c=/^(\s)*(0|[1-9]\d*)?(\s)*$/;
}z47b8ea6de4=(z47b8ea6de4)?z47b8ea6de4:event;var charCode=(z47b8ea6de4.charCode)
?z47b8ea6de4.charCode:0;;var keyCode=(z47b8ea6de4.keyCode)?z47b8ea6de4.keyCode:0
;if(!z47b8ea6de4.ctrlKey&&!z47b8ea6de4.altKey&&((AIP_ie5&&keyCode>31)||(AIP_ns5
&&keyCode==0)))
{if(AIP_ie5)charCode=keyCode;if((charCode<48||charCode>57)&&charCode!=
zbb9926710f.charCodeAt(0)&&charCode!=zbb9926710f.charCodeAt(zbb9926710f.length-1
)&&charCode!=45)return false;
if(AIP_ns5)
{var z9236a33477=0;var ze58602e1b0=0;if(input.createTextRange){var z3a70a41e4a=
document.selection.createRange().duplicate();z3a70a41e4a.moveStart('textedit',-1
);z9236a33477=z3a70a41e4a.text.length;ze58602e1b0=z3a70a41e4a.text.length;}else 
if(input.setSelectionRange){z9236a33477=input.selectionStart;ze58602e1b0=input.
selectionEnd;}var zcfc650c40a=input.value.substring(0,z9236a33477)+String.
fromCharCode(charCode)+input.value.substring(ze58602e1b0,input.value.length);if(
zbb9926710f.indexOf(',')!=-1)
zcfc650c40a=zcfc650c40a.replace(',','.');var za806a64e1c=(zee4bb7ed49)?
z46212caa6d.test(zcfc650c40a):zccaa9ca98c.test(zcfc650c40a);if(!za806a64e1c)
return false;
if((AIP_compare(zcfc650c40a,zcff736fcd7)==-1&&AIP_compare(zcff736fcd7,0)==-1)||(
AIP_compare(z634e45b2d9,zcfc650c40a)==-1&&AIP_compare(z634e45b2d9,0)==1))
return false;
}else if(AIP_ie5)
{var z3a70a41e4a=document.selection.createRange();var z80e29c55a2=input.value;if
(z3a70a41e4a.text){z3a70a41e4a.text=String.fromCharCode(charCode);var 
zcfc650c40a=input.value;}else

{
var z00a7f30f40=document.selection.createRange().duplicate();z00a7f30f40.
moveStart('textedit',-1);var z9236a33477=z00a7f30f40.text.length;if(input.
setSelectionRange)
z9236a33477=input.selectionEnd;var zcfc650c40a=input.value.substring(0,
z9236a33477)+String.fromCharCode(charCode)+input.value.substring(z9236a33477,
input.value.length);}if(zbb9926710f.indexOf(',')!=-1)
zcfc650c40a=zcfc650c40a.replace(',','.');var za806a64e1c=(zee4bb7ed49)?
z46212caa6d.test(zcfc650c40a):zccaa9ca98c.test(zcfc650c40a);if(!za806a64e1c){
input.value=z80e29c55a2;return false}
if((AIP_compare(zcfc650c40a,zcff736fcd7)==-1&&AIP_compare(zcff736fcd7,0)==-1)||(
AIP_compare(z634e45b2d9,zcfc650c40a)==-1&&AIP_compare(z634e45b2d9,0)==1)){input.
value=z80e29c55a2;return false}
}}return true;}function AIP_leftTrim(z88fbeac158){var zb10810f949=
/^(\s*)(\b[\w\W]*)$/;if(zb10810f949.test(z88fbeac158)){
z88fbeac158=z88fbeac158.replace(zb10810f949,'$2');}return z88fbeac158;}function 
AIP_rightTrim(z88fbeac158)
{var zb10810f949=/^([\w\W]*)(\b\s*)$/;if(zb10810f949.test(z88fbeac158))
z88fbeac158=z88fbeac158.replace(zb10810f949,'$1');return z88fbeac158;}
z70a9094684=/([\$\(\)\*\+\.\[\]\?\\\/\^\{\}\|])/g;function AIP_numeralsAfter(
input,z68df309b4b,zcff736fcd7,z634e45b2d9,zee4bb7ed49,zbb9926710f)
{var z7b30653e60="";if(AIP_compare(zcff736fcd7,0)==-1)z7b30653e60="-?";var 
zf66d5231cd="";var z3489ee50b2="";if(zee4bb7ed49>0)
{var zf66d5231cd="\\.\\d{1,"+zee4bb7ed49+"}(?=\\d*$)";var z3489ee50b2=
"\\.\\d{0,"+zee4bb7ed49+"}(?=\\d*$)";var z24f907574f="(^"+z7b30653e60+"\\d+"+
z3489ee50b2+")|(^"+z7b30653e60+"\\d+$)|(^"+z7b30653e60+zf66d5231cd+")";}else var
 z24f907574f="(^"+z7b30653e60+"\\d+"+z3489ee50b2+")|(^"+z7b30653e60+"\\d+$)";var
 zb10810f949=new RegExp(z24f907574f,"g");

var zf08d22b9c9=AIP_leftTrim(input.value);var zf08d22b9c9=AIP_rightTrim(input.
value);var z4f6c7ef976=String.fromCharCode(zbb9926710f.charCodeAt(0));if(
zbb9926710f.indexOf('.')==-1)zf08d22b9c9=zf08d22b9c9.replace('.','#');if(
zbb9926710f.indexOf(',')!=-1)zf08d22b9c9=zf08d22b9c9.replace(',','.');var 
zf08d22b9c9=zf08d22b9c9.match(zb10810f949);if(zf08d22b9c9&&AIP_compare(
zf08d22b9c9[0],zcff736fcd7)>=0&&AIP_compare(zf08d22b9c9[0],z634e45b2d9)<=0)
if(zee4bb7ed49>0)
{var z4195c66780=zf08d22b9c9[0].indexOf('.')
var zf744539921="";if(z4195c66780>=0)n=z4195c66780+zee4bb7ed49+1-zf08d22b9c9[0].
length;else n=zee4bb7ed49;for(var z071c7b1348=1;z071c7b1348<=n;z071c7b1348++)
zf744539921+="0";var zcc3c22df40=new RegExp("^"+z4f6c7ef976.replace(z70a9094684,
"\\$1"),"g");var z9e2a404337=new RegExp("^-"+z4f6c7ef976.replace(z70a9094684,
"\\$1"),"g");zf08d22b9c9[0]=zf08d22b9c9[0].replace(zcc3c22df40,"0"+z4f6c7ef976);
if(z4195c66780==-1)zf08d22b9c9[0]=z68df309b4b+(zf08d22b9c9[0]+"."+zf744539921).
replace(".",z4f6c7ef976);else zf08d22b9c9[0]=z68df309b4b+zf08d22b9c9[0].replace(
".",z4f6c7ef976)+zf744539921;input.value=zf08d22b9c9[0];}else
input.value=z68df309b4b+zf08d22b9c9[0];else input.value="";return true;}function
 AIP_numeralsBefore(input,z68df309b4b)
{

var zb10810f949=new RegExp("^"+z68df309b4b.replace(z70a9094684,"\\$1"),"g");
input.value=input.value.replace(zb10810f949,"");return true;}




function AIP_pressing(zcb3dbc5516,zde1357c0ec)
{var keyCode;var z56a7f40a07;
keyCode=window.event?event.keyCode:zcb3dbc5516.which;z56a7f40a07=false;if(
keyCode!=9)
{
var z213f204d06=AIP_cleanKeyCode(keyCode,zcb3dbc5516);
var position=AIP_getCursorPosition(zde1357c0ec);var z66e16accf0;z66e16accf0=
AIP_concatenateMask(zde1357c0ec);
var mode=zde1357c0ec.getAttribute("modeInput");
if(z66e16accf0!=null)
{z56a7f40a07=AIP_operateForMask(zde1357c0ec,zcb3dbc5516);}else
{
z56a7f40a07=AIP_operateForNoMask(zde1357c0ec,zcb3dbc5516);}return false;}
return true;}






function AIP_operateForMask(zde1357c0ec,zcb3dbc5516)
{
keyCode=window.event?event.keyCode:zcb3dbc5516.which;var z56a7f40a07;z56a7f40a07
=false;
var z213f204d06=AIP_cleanKeyCode(keyCode,zcb3dbc5516);
var position=AIP_getCursorPosition(zde1357c0ec);var z66e16accf0;z66e16accf0=
AIP_concatenateMask(zde1357c0ec);
var mode=zde1357c0ec.getAttribute("modeInput");switch(keyCode)
{
case 9:z56a7f40a07=true;break;
case 13:z56a7f40a07=true;break;
case 35:AIP_setCursorAtPosition(zde1357c0ec,zde1357c0ec.value.length);break;
case 36:AIP_setCursorAtPosition(zde1357c0ec,0);break;
case 16:return false;break;
case 17:return false;break;
case 18:return false;break;
case 46:if(position>-1){
var za15a811948=z66e16accf0.charAt(position);
if(za15a811948=='#')
{
if(document.selection)
{AIP_showCurrentCharacter(zde1357c0ec,position,false,'_')
}else
{
AIP_showCurrentCharacter(zde1357c0ec,position,true,'__')
}}else
{


if(!document.selection)
{var z6ccc150c07=zde1357c0ec.value.charAt(position)+zde1357c0ec.value.charAt(
position);AIP_showCurrentCharacter(zde1357c0ec,position,true,z6ccc150c07)
}}}break;
case 8:if(position>-1)
{var za15a811948;var z563de7c812;z563de7c812=false;
while(position>0)
{position--;za15a811948=z66e16accf0.charAt(position);
if(za15a811948=='#')
{if(document.selection)
{AIP_showCurrentCharacter(zde1357c0ec,position,false,'_',0);}else
{AIP_showCurrentCharacter(zde1357c0ec,position,true,'__',1);}break;}else
{if(!document.selection&&position==0)
{AIP_showCurrentCharacter(zde1357c0ec,position,true,zde1357c0ec.value.charAt(
position),0);break;}}}}break;
case 37:
if(document.selection)
{AIP_setCursorAtPosition(zde1357c0ec,position-1);zde1357c0ec.zec188c9943=
position-1;}break

case 39:
if(document.selection)
{AIP_setCursorAtPosition(zde1357c0ec,position+1);zde1357c0ec.zec188c9943=
position+1;}break;
default:if(z66e16accf0.charAt(position)!='#')
position=AIP_getPositionOfMaskString(zde1357c0ec,position);
if(z66e16accf0.charAt(position)=='#')
{var value=zde1357c0ec.value;var zfe4fea12f2='0123456789';var zcd8fdb4a3a=
'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';var z6e6e64c419=
'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';if(position<
z66e16accf0.length)
{switch(mode)
{
case "none":AIP_setCharacterAtPosition(zde1357c0ec,z213f204d06,position,
zcb3dbc5516);break;
case "character":AIP_showCharacterInMask(zcd8fdb4a3a,zde1357c0ec,position,
z213f204d06,zcb3dbc5516);break;
case "numeric":AIP_showCharacterInMask(zfe4fea12f2,zde1357c0ec,position,
z213f204d06,zcb3dbc5516);break;case "mask":var z267f41b4a1=zde1357c0ec.
getAttribute("customFormat");var zc84d9ea3d7=z267f41b4a1.charAt(position);switch
(zc84d9ea3d7)
{case 'X':AIP_showCharacterInMask(z6e6e64c419,zde1357c0ec,position,z213f204d06,
zcb3dbc5516);break;case '9':AIP_showCharacterInMask(zfe4fea12f2,zde1357c0ec,
position,z213f204d06,zcb3dbc5516);break;case 'A':AIP_showCharacterInMask(
zcd8fdb4a3a,zde1357c0ec,position,z213f204d06,zcb3dbc5516);break;}break;}}}else
{if(!document.selection)
{AIP_showCurrentCharacter(zde1357c0ec,position,true,zde1357c0ec.value.charAt(
position),0);}}break;}return z56a7f40a07;}






function AIP_operateForNoMask(zde1357c0ec,zcb3dbc5516)
{
keyCode=window.event?event.keyCode:zcb3dbc5516.which;var z56a7f40a07;z56a7f40a07
=false;
var z213f204d06=AIP_cleanKeyCode(keyCode,zcb3dbc5516);
var position=AIP_getCursorPosition(zde1357c0ec);var z66e16accf0;z66e16accf0=
AIP_concatenateMask(zde1357c0ec);
var mode=zde1357c0ec.getAttribute("modeInput");var value=zde1357c0ec.value;
switch(keyCode)
{
case 37:if(document.selection)
{AIP_setCursorAtPosition(zde1357c0ec,position-1);zde1357c0ec.zec188c9943=
position;}break

case 39:if(document.selection)
{AIP_setCursorAtPosition(zde1357c0ec,position+1);zde1357c0ec.zec188c9943=
position;}break;
case 8:if(document.selection)
{AIP_showCurrentCharacter(zde1357c0ec,position-1,true,'');zde1357c0ec.maxLength=
zde1357c0ec.maxLength-1;break;}else
{var x;var y;if(zde1357c0ec.getAttribute("delimiter")!=null)
{if(position<=zde1357c0ec.value.indexOf(zde1357c0ec.getAttribute("delimiter")))
{x=zde1357c0ec.value.substring(0,position-1);y=zde1357c0ec.value.substring(
position,zde1357c0ec.value.length);position--;}else
{if(position==zde1357c0ec.value.length)
{x=zde1357c0ec.value.substring(0,position);y=zde1357c0ec.value.substring(
position+1,zde1357c0ec.value.length);}else
{x=zde1357c0ec.value.substring(0,position-1);y=zde1357c0ec.value.substring(
position,zde1357c0ec.value.length);}}}else
{if(position<zde1357c0ec.value.length)
{x=zde1357c0ec.value.substring(0,position-1);y=zde1357c0ec.value.substring(
position,zde1357c0ec.value.length);position--;}else
{x=zde1357c0ec.value.substring(0,position);y=zde1357c0ec.value.substring(
position+1,zde1357c0ec.value.length);}}zde1357c0ec.maxLength=zde1357c0ec.
maxLength+1;zde1357c0ec.value=x+zde1357c0ec.value.charAt(position)+y;zde1357c0ec
.maxLength=zde1357c0ec.maxLength-1;if(zde1357c0ec.getAttribute("delimiter")!=
null)
{if(position<zde1357c0ec.value.indexOf(zde1357c0ec.getAttribute("delimiter")))
AIP_setCursorAtPosition(zde1357c0ec,position+1);else
AIP_setCursorAtPosition(zde1357c0ec,position);}else
AIP_setCursorAtPosition(zde1357c0ec,position+1);zde1357c0ec.zec188c9943=position
+1;break;}
case 46:if(document.selection)
{AIP_showCurrentCharacter(zde1357c0ec,position,true,'');zde1357c0ec.maxLength=
zde1357c0ec.maxLength-1;}else
{var x=zde1357c0ec.value.substring(0,position);var y=zde1357c0ec.value.substring
(position+1,zde1357c0ec.value.length);zde1357c0ec.maxLength=zde1357c0ec.
maxLength;zde1357c0ec.value=x+zde1357c0ec.value.charAt(position)+y;zde1357c0ec.
maxLength=zde1357c0ec.maxLength-1;AIP_setCursorAtPosition(zde1357c0ec,position);
zde1357c0ec.zec188c9943=position;}
case 16:return false;break;
case 17:return false;break;
case 18:return false;break;
case 35:AIP_setCursorAtPosition(zde1357c0ec,zde1357c0ec.value.length);break;
case 36:AIP_setCursorAtPosition(zde1357c0ec,0);break;
default:
var shift=false
if(!window.event)
{if(zcb3dbc5516.shiftKey)
shift=true;}switch(mode)
{
case "none":if(zde1357c0ec.value.length==0)
zde1357c0ec.maxLength=1;else
{if(document.selection||(!document.selection&&position==zde1357c0ec.value.length
))
zde1357c0ec.maxLength=zde1357c0ec.maxLength+1;}if(document.selection)
AIP_setCharacterAtPositionWithoutMask(zde1357c0ec,z213f204d06,position,
zcb3dbc5516);else
AIP_showCurrentCharacter(zde1357c0ec,position,true,z213f204d06,zde1357c0ec.value
.length-position+1);break;
case "character":if('abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'.
indexOf(z213f204d06)!=-1)
{if(zde1357c0ec.value.length==0)
zde1357c0ec.maxLength=1;else
{if(document.selection||(!document.selection&&position==zde1357c0ec.value.length
))
zde1357c0ec.maxLength=zde1357c0ec.maxLength+1;}if(document.selection)
{AIP_setCharacterAtPositionWithoutMask(zde1357c0ec,z213f204d06,position,
zcb3dbc5516);z56a7f40a07=true;}else
{AIP_showCurrentCharacter(zde1357c0ec,position,true,z213f204d06,zde1357c0ec.
value.length-position+1);}}else
{if(!document.selection)
{zde1357c0ec.maxLength=position-1;}}break;
case "numeric":AIP_workWithNumbers(zde1357c0ec,z213f204d06,position,zcb3dbc5516,
null);break;

case "percent":AIP_workWithNumbers(zde1357c0ec,z213f204d06,position,zcb3dbc5516,
false);return false;break;

case "datetime":if('0123456789'.indexOf(z213f204d06)!=-1&&!shift)
{var z4df47fefd8=zde1357c0ec.getAttribute("format");if(z4df47fefd8!=null)
zde1357c0ec.maxLength=z4df47fefd8.length;else
zde1357c0ec.maxLength=0;if(position<zde1357c0ec.maxLength)
{var z72be4d2f93=false;
switch(z4df47fefd8.charAt(position))
{case 'M':if(z4df47fefd8.charAt(position-1)=='M')
z72be4d2f93=true;else
{if(z213f204d06=='0'||z213f204d06=='1')
z72be4d2f93=true;}break;case 'D':if(z4df47fefd8.charAt(position-1)=='D')
z72be4d2f93=true;else
{if(z213f204d06=='0'||z213f204d06=='1'||z213f204d06=='2'||z213f204d06=='3')
z72be4d2f93=true;}break;case 'Y':z72be4d2f93=true;break;

case '/':if(zde1357c0ec.value.charAt(position)!='/')
{zde1357c0ec.value=zde1357c0ec.value.substring(0,position)+'/'+zde1357c0ec.value
.substring(position);}position++;if(z4df47fefd8.charAt(position)=='D'&&(
z213f204d06=='0'||z213f204d06=='1'||z213f204d06=='2'||z213f204d06=='3'))
z72be4d2f93=true;else if(z4df47fefd8.charAt(position)=='M'&&(z213f204d06=='0'||
z213f204d06=='1'))
z72be4d2f93=true;else if(z4df47fefd8.charAt(position)=='Y')
z72be4d2f93=true;else
position--;break;}if(z4df47fefd8.charAt(position)=='/')
{if(document.selection)
AIP_setCharacterAtPositionWithoutMask(zde1357c0ec,'/',position,zcb3dbc5516);else
{if(!z72be4d2f93)
position++;zde1357c0ec.value=zde1357c0ec.value.substring(0,position-1)+'/'+
zde1357c0ec.value.substring(position);}}if(z72be4d2f93)
{if(!document.selection)
{if(position<zde1357c0ec.value.length)
{zde1357c0ec.value=zde1357c0ec.value.substring(0,position)+z213f204d06+
zde1357c0ec.value.substring(position+1);}else
{zde1357c0ec.value=zde1357c0ec.value.substring(0,position)+z213f204d06+
zde1357c0ec.value.substring(position);}zde1357c0ec.maxLength=zde1357c0ec.value.
length;if(position<zde1357c0ec.value.length)
zde1357c0ec.maxLength=zde1357c0ec.maxLength-1;if(!AIP_isTextSelected(zde1357c0ec
)&&position<zde1357c0ec.value.length)
zde1357c0ec.maxLength=zde1357c0ec.maxLength-1;z56a7f40a07=false;}else
{AIP_setCharacterAtPositionWithoutMask(zde1357c0ec,z213f204d06,position,
zcb3dbc5516);z56a7f40a07=true;}}else
{zde1357c0ec.maxLength=zde1357c0ec.value.length;if(!document.selection)
{AIP_setCursorAtPosition(zde1357c0ec,zde1357c0ec.value.length);}}
if(z4df47fefd8.charAt(position+1)=='/')
{if(document.selection)
{position++;AIP_setCharacterAtPositionWithoutMask(zde1357c0ec,'/',position,
zcb3dbc5516);}else
{if(position!=0)
zde1357c0ec.maxLength=zde1357c0ec.value.length;zde1357c0ec.value=zde1357c0ec.
value.substring(0,position)+z213f204d06+'/'+zde1357c0ec.value.substring(position
+2);zde1357c0ec.maxLength=zde1357c0ec.value.length;break;}}}}else
{if(!document.selection)
{zde1357c0ec.maxLength=zde1357c0ec.value.length-1;AIP_setCursorAtPosition(
zde1357c0ec,position);}}break;
case "currency":z56a7f40a07=false;AIP_workWithNumbers(zde1357c0ec,z213f204d06,
position,zcb3dbc5516,true);break;}break;}return z56a7f40a07;}















function AIP_workWithNumbers(zde1357c0ec,z213f204d06,position,zcb3dbc5516,
z0da6fb678b)
{var zfe4fea12f2='1234567890';var zfeff303fa2;var ze4eeb5a35c=0;var z5c21cc1fcb=
zde1357c0ec.getAttribute("delimiter");var ze47ba5a5dd=zde1357c0ec.getAttribute(
"specialSymbol");var z3765a08543=zde1357c0ec.getAttribute("precision");var 
z09866ecd38=0;var z72be4d2f93=false;var selected=AIP_isTextSelected(zde1357c0ec)
;if(z3765a08543!=null&&z5c21cc1fcb!=null)
zfe4fea12f2=zfe4fea12f2+z5c21cc1fcb;zfeff303fa2=AIP_getOnlyNumber(zde1357c0ec.
value,zfe4fea12f2);ze4eeb5a35c=position;if(zde1357c0ec.value.length!=zfeff303fa2
.length)
{z09866ecd38=ze47ba5a5dd.length+1;if(z0da6fb678b==true)
{ze4eeb5a35c=position-zde1357c0ec.value.length+zfeff303fa2.length;}}
if(zfeff303fa2.length==0)
zde1357c0ec.maxLength=0;if(zfe4fea12f2.indexOf(z213f204d06)!=-1)
{if(z213f204d06!=z5c21cc1fcb)
{
if(zfeff303fa2.indexOf(z5c21cc1fcb)==-1)
{z72be4d2f93=true;if(selected)
zfeff303fa2=zfeff303fa2.substring(0,ze4eeb5a35c)+z213f204d06+zfeff303fa2.
substring(ze4eeb5a35c+1);else
{zde1357c0ec.maxLength++;zfeff303fa2=zfeff303fa2.substring(0,ze4eeb5a35c)+
z213f204d06+zfeff303fa2.substring(ze4eeb5a35c);}}
else
{if(ze4eeb5a35c<=zfeff303fa2.indexOf(z5c21cc1fcb))
{zde1357c0ec.maxLength++;zfeff303fa2=zfeff303fa2.substring(0,ze4eeb5a35c)+
z213f204d06+zfeff303fa2.substring(ze4eeb5a35c);}else
{if(zfeff303fa2.length-zfeff303fa2.indexOf(z5c21cc1fcb)-1<parseInt(z3765a08543))
{zde1357c0ec.maxLength++;zfeff303fa2=zfeff303fa2.substring(0,ze4eeb5a35c)+
z213f204d06+zfeff303fa2.substring(ze4eeb5a35c);}else
{if(ze4eeb5a35c<zfeff303fa2.length)
zfeff303fa2=zfeff303fa2.substring(0,ze4eeb5a35c)+z213f204d06+zfeff303fa2.
substring(ze4eeb5a35c+1);}}}}
else
{if(zfeff303fa2.indexOf(z5c21cc1fcb)==-1)
{zde1357c0ec.maxLength++;zfeff303fa2=zfeff303fa2.substring(0,ze4eeb5a35c)+
z5c21cc1fcb+zfeff303fa2.substr(ze4eeb5a35c,parseInt(z3765a08543));if(ze4eeb5a35c
!=zfeff303fa2.length)
zde1357c0ec.maxLength=zfeff303fa2.length;z72be4d2f93=true;}}if(z72be4d2f93&&
z0da6fb678b==true&&zfeff303fa2.length==1)
{position+=ze47ba5a5dd.length+1;}
if(z0da6fb678b!=null&&z72be4d2f93)
{zde1357c0ec.maxLength=zfeff303fa2.length+ze47ba5a5dd.length+1;if(z0da6fb678b)
{zde1357c0ec.value=ze47ba5a5dd+' '+zfeff303fa2;}else
{zde1357c0ec.value=zfeff303fa2+' '+ze47ba5a5dd;}}else if(z0da6fb678b==null)
{zde1357c0ec.value=zfeff303fa2;}AIP_setCursorAtPosition(zde1357c0ec,position+1);
}else
{if(!document.selection)
{zde1357c0ec.maxLength=zde1357c0ec.value.length;AIP_setCursorAtPosition(
zde1357c0ec,zde1357c0ec.value.length);}}}










function AIP_showCharacterInMask(zef460ffa6b,zde1357c0ec,position,z213f204d06,
zcb3dbc5516)
{if(zef460ffa6b.indexOf(z213f204d06)!=-1)
AIP_setCharacterAtPosition(zde1357c0ec,z213f204d06,position,zcb3dbc5516);else
{if(!document.selection)
AIP_showCurrentCharacter(zde1357c0ec,position,true,zde1357c0ec.value.charAt(
position));}}








function AIP_setCharacterAtPositionWithoutMask(zde1357c0ec,z499b77dd38,position,
zcb3dbc5516)
{var z8fcf23ca58,z3a4c29dd4e;z8fcf23ca58=zde1357c0ec.value.substring(0,position)
;z3a4c29dd4e=zde1357c0ec.value.substring(position+1,zde1357c0ec.value.length);if
(document.selection)
zde1357c0ec.value=z8fcf23ca58+z499b77dd38+z3a4c29dd4e;else
{

if(position<zde1357c0ec.value.length)
zde1357c0ec.value=z8fcf23ca58+z499b77dd38+z3a4c29dd4e;else

zde1357c0ec.value=z8fcf23ca58+z3a4c29dd4e;}position=AIP_getPositionOfMaskString(
zde1357c0ec,position);AIP_setCursorAtPosition(zde1357c0ec,position);zde1357c0ec.
z4951155491=position;return false;}







function AIP_setCharacterAtPosition(zde1357c0ec,z499b77dd38,position,zcb3dbc5516
)
{var x,y;var z66e16accf0=AIP_concatenateMask(zde1357c0ec);x=zde1357c0ec.value.
substring(0,position);y=zde1357c0ec.value.substring(position+1,zde1357c0ec.value
.length);
if(document.selection)
{
if(z66e16accf0.charAt(position)=='#')
zde1357c0ec.value=x+z499b77dd38+y;else

zde1357c0ec.value=x+z66e16accf0.charAt(position)+y;}else
{

if(zde1357c0ec.value.charAt(position+1)!='_')
{
if(z66e16accf0.charAt(position)=='#')
zde1357c0ec.value=x+z499b77dd38+y;else

zde1357c0ec.value=x+z66e16accf0.charAt(position)+y;}else
zde1357c0ec.value=x+z499b77dd38+y;}position=AIP_getPositionOfMaskString(
zde1357c0ec,position);AIP_setCursorAtPosition(zde1357c0ec,position);zde1357c0ec.
z4951155491=position;return false;}





function AIP_controlFocus(zde1357c0ec)
{var z66e16accf0=AIP_concatenateMask(zde1357c0ec);if(z66e16accf0!=null)
{zde1357c0ec.maxLength=z66e16accf0.length;if(zde1357c0ec.value.length==0||
zde1357c0ec.value==null)
{if(z66e16accf0!=null)
{var z4c7b93062a=''
var z835472c1bd
z835472c1bd=0
while(z835472c1bd<z66e16accf0.length)
{if(z66e16accf0.charAt(z835472c1bd)=='#')
z4c7b93062a=z4c7b93062a+'_';else
z4c7b93062a=z4c7b93062a+z66e16accf0.charAt(z835472c1bd);z835472c1bd++;}
zde1357c0ec.value=z4c7b93062a;}AIP_setCursorAtPosition(zde1357c0ec,
AIP_getPositionOfMaskString(zde1357c0ec,0));}else
{AIP_setCursorAtPosition(zde1357c0ec,AIP_getCursorPosition(zde1357c0ec));}}}






function AIP_concatenateMask(zde1357c0ec)
{var z66e16accf0;

if(zde1357c0ec.getAttribute("mask")!=null)
z66e16accf0=zde1357c0ec.getAttribute("mask");else if(zde1357c0ec.getAttribute(
"customFormat")!=null&&zde1357c0ec.getAttribute("modeInput")=="mask")
{
var z9a8eab6586=zde1357c0ec.getAttribute("customFormat");var index=0;z66e16accf0
="";while(index<z9a8eab6586.length)
{if(z9a8eab6586.charAt(index)=="9"||z9a8eab6586.charAt(index)=="A"||z9a8eab6586.
charAt(index)=="X")
z66e16accf0+="#";else
z66e16accf0+=z9a8eab6586.charAt(index);index++;}}return z66e16accf0;}





function AIP_getPositionOfMaskString(zde1357c0ec,z9f13762a69)
{var position=z9f13762a69;while(position<zde1357c0ec.value.length)
{if(zde1357c0ec.value.charAt(position)=='_')
break;position++;}
return position;}





function AIP_setCursorAtPosition(zde1357c0ec,position)
{
if(document.selection&&zde1357c0ec.createTextRange)
{var z773667b54a=zde1357c0ec.createTextRange();z773667b54a.moveStart('character'
,position);z773667b54a.collapse();z773667b54a.select();}
else if(zde1357c0ec.selectionStart||zde1357c0ec.selectionStart=='0')
{zde1357c0ec.z4951155491=position;zde1357c0ec.selectionStart=position;
zde1357c0ec.selectionEnd=position;}return true;}




function AIP_getCursorPosition(zde1357c0ec)
{var selection,zfd87bb3113,z00286bacac,z071c7b1348=-1;
if(document.selection&&zde1357c0ec.createTextRange)
{selection=document.selection;if(selection)
{z00286bacac=selection.createRange();zfd87bb3113=zde1357c0ec.createTextRange();
zfd87bb3113.setEndPoint("EndToStart",z00286bacac);z071c7b1348=zfd87bb3113.text.
length;}}
else
{z071c7b1348=zde1357c0ec.selectionStart;}return z071c7b1348;}






function AIP_isTextSelected(zde1357c0ec)
{var selected=false,zbc17efae34,z8212dbf228,zf73b559169,z00286bacac;if(document.
selection)
{zf73b559169=document.selection.createRange();z00286bacac=document.selection.
createRange();zbc17efae34=zde1357c0ec.createTextRange();zbc17efae34.setEndPoint(
"EndToStart",zf73b559169);z8212dbf228=zde1357c0ec.createTextRange();z8212dbf228.
setEndPoint("EndToEnd",z00286bacac);if(zbc17efae34.text.length!=z8212dbf228.text
.length)
selected=true;}else
{if(zde1357c0ec.selectionStart!=zde1357c0ec.selectionEnd)
selected=true;}var z3765a08543=zde1357c0ec.getAttribute("precision")
var z5c21cc1fcb=zde1357c0ec.getAttribute("delimiter");if(z3765a08543!=null&&
z5c21cc1fcb!=null&&!selected)
{if(document.selection)
{if(zbc17efae34.text.length>zde1357c0ec.value.indexOf(z5c21cc1fcb)&&zde1357c0ec.
value.substring(zde1357c0ec.value.indexOf(z5c21cc1fcb)+1,zde1357c0ec.value.
length).length==parseInt(z3765a08543))
selected=true;}else
{
if(zde1357c0ec.selectionEnd>zde1357c0ec.value.indexOf(z5c21cc1fcb)&&zde1357c0ec.
value.substring(zde1357c0ec.value.indexOf(z5c21cc1fcb)+1,zde1357c0ec.value.
length).length==parseInt(z3765a08543)&&zde1357c0ec.value.indexOf(z5c21cc1fcb)!=-
1)
{selected=true;}}}return selected;}








function AIP_cleanKeyCode(z499b77dd38,zcb3dbc5516)
{switch(z499b77dd38)
{case 96:return "0";break;case 97:return "1";break;case 98:return "2";break;case
 99:return "3";break;case 100:return "4";break;case 101:return "5";break;case 
102:return "6";break;case 103:return "7";break;case 104:return "8";break;case 
105:return "9";break;case 188:return ",";break;case 190:return ".";break;default
:var shift;var zd6738ba89e;var zcd8fdb4a3a=
"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";var zfe4fea12f2=
"0123456789";if(window.event)
{shift=event.shiftKey;zd6738ba89e=event.z3139cb7c98;}else
{shift=zcb3dbc5516.shiftKey;zd6738ba89e=zcb3dbc5516.z3139cb7c98;}var zf0b38859d2
,zd526d89aaa;zd526d89aaa=String.fromCharCode(z499b77dd38);if(zcd8fdb4a3a.indexOf
(zd526d89aaa)!=-1)
if(shift||zd6738ba89e)
return zd526d89aaa;else
return String.fromCharCode(z499b77dd38+32);else
{if(zfe4fea12f2.indexOf(zd526d89aaa)!=-1)
return zd526d89aaa;}
return String.fromCharCode(z499b77dd38);break;}}










function AIP_getOnlyNumber(z7b0c7194dc,zaba5ecd428)
{var index=0;var z56a7f40a07='';
var ze3a0599f23=false;if(zaba5ecd428.indexOf(z7b0c7194dc.charAt(0))==-1)
ze3a0599f23=true;





while(index<z7b0c7194dc.length)
{if(!ze3a0599f23)
{if(zaba5ecd428.indexOf(z7b0c7194dc.charAt(index))==-1)
break;z56a7f40a07+=z7b0c7194dc.charAt(index);}else
{if(zaba5ecd428.indexOf(z7b0c7194dc.charAt(index))!=-1)
{z56a7f40a07+=z7b0c7194dc.charAt(index);ze3a0599f23=false;}}index++;}return 
z56a7f40a07;}










function AIP_showCurrentCharacter(zde1357c0ec,position,z0cf2cf8f73,z3bccb19cb9,
zd2bc1f27d5)
{var x=zde1357c0ec.value.substring(0,position);var y=zde1357c0ec.value.substring
(position+1,zde1357c0ec.value.length);var zec108ed2fc;if(zd2bc1f27d5==null)
zec108ed2fc=0;else
zec108ed2fc=zd2bc1f27d5;if(z0cf2cf8f73)
zde1357c0ec.maxLength=zde1357c0ec.maxLength+1;zde1357c0ec.value=x+z3bccb19cb9+y;
if(z0cf2cf8f73)
zde1357c0ec.maxLength=zde1357c0ec.maxLength-1;AIP_setCursorAtPosition(
zde1357c0ec,position+zec108ed2fc);zde1357c0ec.zec188c9943=position+zec108ed2fc;}
function AIP_paste(zde1357c0ec)
{
var ze6ac4bbfa7=window.clipboardData.getData("Text");var z66e16accf0=
AIP_concatenateMask(zde1357c0ec);var z1e909e93fe=zde1357c0ec.getAttribute(
"modeInput");var z5d70de8418='';var zdf92d16e79=0;for(var z071c7b1348=0;
z071c7b1348<z66e16accf0.length;z071c7b1348++)
{var za15a811948=z66e16accf0.charAt(z071c7b1348);
if(za15a811948=='#')
{var zc561af11c0=ze6ac4bbfa7.charAt(zdf92d16e79);

if(z1e909e93fe=="numeric")
{if('0123456789'.indexOf(zc561af11c0)==-1)
return false;}else if(z1e909e93fe=="character")
{if('abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'.indexOf(zc561af11c0)
==-1)
return false;}else
{return false;}
z5d70de8418+=zc561af11c0;zdf92d16e79++;}else
{
z5d70de8418+=za15a811948;}}zde1357c0ec.value=z5d70de8418;return false;}
